package com.geek.javase.ch06.test2;

import java.util.Calendar;

/*
 *@author wangpeng
 *2025/10/14 23:30
 *@description TODO
 */
//3.你出生的当天是星期几
public class Demo3 {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(2002, Calendar.APRIL, 15);
        int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
        String[] daysOfWeek = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
        System.out.println("2002年4月15日是：" + daysOfWeek[dayOfWeek - 1]);

    }

}
